package au.chao.message.handler;

import org.apache.log4j.Logger;

import au.chao.message.Message;
import au.chao.util.DateUtil;

public class TextMessageHandler implements MessageHandler {
	Logger log = Logger.getLogger(TextMessageHandler.class);
	private Message message;

	public TextMessageHandler(Message msg) {
		this.message = msg;
	}

	@Override
	public void handleMessage() {
		new Thread(this).start();
	}

	@Override
	public void run() {
		log.info(DateUtil.now() + " Received Message" + message.toString());
	}
}
